package com.mock.water.core.exception;

/**
 * $$
 *
 * @author ifredomvip@gmail.com
 * @version 1.0.0
 * @date 2022/10/19 11:06
 **/
public class MyCustomException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private Integer code;

    private String message;

    public MyCustomException(String message) {
        this.message = message;
    }

    public MyCustomException(String message, Integer code) {
        this.message = message;
        this.code = code;
    }

    public MyCustomException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }

    public MyCustomException(String message, int code, Throwable e) {
        super(message, e);
        this.message = message;
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public Integer getCode() {
        return code;
    }
}
